package com.zhiyou100.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * @author yang
 * @className Student
 * @packageName com.zhiyou100.entity
 * @Description TODO 学生类
 * @date 2020-08-20 09:17
 */

// 注册 bean
@Component("stu")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class Student implements Serializable, StudentInterface {
    private Integer sid;
    private String sname;
    private Float score;

    @Override
    public void show() {
        System.out.println("我叫 " + sname + " 分数是 " + score + " id 是" + score);
    }

    @Override
    public void hello() {
        System.out.println(sname + " hello 方法");
    }
}
